<template>
  <div>
    <router-view v-slot="{ Component }">
      <transition
        mode="out-in"
        name="el-fade-in-linear"
      >
        <keep-alive :include="$store.getters['router/keepAliveRouters']">
          <component
            :is="Component"
          />
        </keep-alive>
      </transition>
    </router-view>
  </div>
</template>

<script>
import {useRoute} from 'vue-router'
import {defineComponent} from 'vue'

export default defineComponent({
  name: 'CrmSystem',
  setup() {
    const route = useRoute()

    const key = () => {
      return route.fullPath
    }

    return {
      key,
    }
  },
})
</script>
